//
//  CMEntityProfile.swift
//  covermedia
//
//  Created by AlienLi on 16/2/19.
//  Copyright © 2016年 covermedia. All rights reserved.
//

import Foundation
import RealmSwift
import ObjectMapper
open class CMEntityProfile: Object, Mappable {
    
// Specify properties to ignore (Realm won't persist these)
    
//  override static func ignoredProperties() -> [String] {
//    return []
//  }
    
    public dynamic var user_id: Int = -1
    public dynamic var user_name: String?
    public dynamic var avatar: String?
    public dynamic var nickname: String?
    public dynamic var mobile: String?
    public dynamic var first_name: String?
    public dynamic var last_name: String?
    public dynamic var email: String?
    public dynamic var age: Int = -1
    public dynamic var gender: String?
    public dynamic var birthday: Int = -1
    public dynamic var is_qq: Bool = false
    public dynamic var is_weibo: Bool = false
    public dynamic var is_wechat: Bool = false
    public dynamic var registeer_way: Int = -1
    public dynamic var token: String?



    
    override open static func primaryKey() -> String? {
        return "user_id"
    }
    
    required public convenience init?(map: Map) {
        self.init()
    }
    
    public func mapping(map: Map) {
        user_id <- map["user_id"]
        user_name <- map["user_name"]
        avatar <- map["avatar"]
        nickname <- map["nickname"]
        mobile <- map["mobile"]
        first_name <- map["first_name"]
        last_name <- map["last_name"]
        email <- map["email"]
        gender <- map["gender"]
        birthday <- map["birthday"]
//        password <- map["password"]
        is_qq <- map["is_qq"]
        is_weibo <- map["is_weibo"]
        is_wechat <- map["is_wechat"]
        registeer_way <- map["registeer_way"]
        age <- map["age"]
        token <- map["token"]
    }
    
}
